follow up r62948 handle oracle prefix
authorMark A. Hershberger <mah@users.mediawiki.org>
Thu, 25 Feb 2010 09:33:17 +0000 (09:33 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Thu, 25 Feb 2010 09:33:17 +0000 (09:33 +0000)
maintenance/tests/ApiTest.php
maintenance/tests/MediaWiki_Setup.php
maintenance/tests/SearchMySQLTest.php

index 2dbe55c..bebcffe 100644 (file)
@@ -59,7 +59,7 @@ class ApiTest extends ApiSetup {
        function testApi() {
                global $wgServerName, $wgServer, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if(!isset($wgServerName) || !isset($wgServer)) {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
@@ -76,7 +76,7 @@ class ApiTest extends ApiSetup {
        function testApiLoginNoName() {
                global $wgServerName, $wgServer, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if(!isset($wgServerName) || !isset($wgServer)) {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
@@ -96,7 +96,7 @@ class ApiTest extends ApiSetup {
        function testApiLoginBadPass() {
                global $wgServerName, $wgServer, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if(!isset($wgServerName) || !isset($wgServer)) {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
@@ -116,7 +116,7 @@ class ApiTest extends ApiSetup {
        function testApiLoginGoodPass() {
                global $wgServerName, $wgServer, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if(!isset($wgServerName) || !isset($wgServer)) {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
@@ -136,7 +136,7 @@ class ApiTest extends ApiSetup {
        function testApiGotCookie() {
                global $wgServerName, $wgServer, $wgScriptPath, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if(!isset($wgServerName) || !isset($wgServer)) {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
@@ -161,7 +161,7 @@ class ApiTest extends ApiSetup {
                $this->markTestIncomplete("Not done with this yet");
                global $wgServerName, $wgServer, $wgDBprefix;
 
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
                if($wgServerName == "localhost" || $wgServer == "http://localhost") {
                        $this->markTestIncomplete('This test needs $wgServerName and $wgServer to '.
                                                                          'be set in LocalSettings.php');
index e7acc33..21f0321 100644 (file)
@@ -9,7 +9,13 @@ abstract class MediaWiki_Setup extends PHPUnit_Framework_TestCase {
                $oldTableNames = array();
                foreach( $tables as $table )
                        $oldTableNames[$table] = $db->tableName( $table );
-               $db->tablePrefix( 'parsertest_' );
+               if($wgDBtype == 'oracle') {
+                       $wgDBprefix === 'pt_';
+               } else {
+                       $wgDBprefix === 'parsertest_';
+               }
+
+               $db->tablePrefix( $wgDBprefix );
 
                if( $db->isOpen() ) {
                        foreach ( $tables as $tbl ) {
index ee5de0b..0c2ad22 100644 (file)
@@ -6,7 +6,7 @@ class SearchMySQLTest extends SearchEngineTest {
 
        function setUp() {
                global $wgDBprefix;
-               if($wgDBprefix === "parsertest_") $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
+               if($wgDBprefix === "parsertest_" || ($wgDBtype == 'oracle' && $wgDBprefix === 'pt_')) $this->markTestSkipped("This test can't (yet?) be run with the parser tests");
 
                $GLOBALS['wgContLang'] = new Language;
                $this->db = $this->buildTestDatabase(